#ifndef __UART0_H__
#define __UART0_H__

typedef struct {
    unsigned int ULCON;
    unsigned int UCON;
    unsigned int UFCON;
    unsigned int UMCON;
    unsigned int UTRSTAT;
    unsigned int UERSTAT;
    unsigned int UFSTST;
    unsigned int UMSTAT;
    unsigned int UTXH;
    unsigned int URXH;
    unsigned int UBRDIV;
    unsigned int UFRACVAL;
    unsigned int UINTP;
    unsigned int UINTS;
    unsigned int UINTM;
} uart_t;

#define UART0 (*(uart_t *)0XC00A1000)

void hal_uart0_init(void);
void uart_send_char(char ch);
void uart_send_string(char *str);
char uart_recv_char(void);
char *uart_recv_string(void);

#endif
